package cn.wolfcode.hystrix;

import cn.wolfcode.domain.Product;
import cn.wolfcode.feign.IProductFeignApi;
import org.springframework.stereotype.Component;

/**
 * @Description: Feign集成Hystrix
 * @Author: 伍家钰
 * @Date: 2020/8/29 19:45
 * @Version: 1.0
 */
@Component
public class ProductFeignHystrix implements IProductFeignApi {
    @Override
    public Product get(Long id) {
        System.out.println("走降级方法了。。ProductFeignHystrix。。");
        Product product = new Product();
        product.setName("降级方法:默认对象");
        return product;
    }
}